clear all; close all; clc
a = [-0.7]; b = [0.3];
xh = [1 0 0 0 0 0 0 0 0 0 0 0 0 0 0];
km = 2:length(xh); h(1) = b(1)*xh(1);
for k = km
h(k) = -a(1)*h(k-1) + b(1)*xh(k);
end
x = [0 0 0 0 0 1 1 1 1 1 1 1 1 1 1];
y = conv(x, h);
xdec = deconv(y, h);
figure(1)
stem (1:length(y), y); hold on
stem (1:length(xdec), xdec,'r'); 
hold off
grid on ; 
legend('y','x'); xlabel('k')